package com.sc.nft.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.sc.nft.dto.OrderSettleDTO;
import com.sc.nft.entity.OrderSettle;
import com.sc.nft.entity.PayOrder;
import com.sc.nft.entity.TradingPoolOrder;
import com.sc.nft.enums.*;

import java.math.BigDecimal;
import java.util.List;

/**
 * <p>
 * 结算单 服务类
 * </p>
 *
 * @author PC
 * @since 2024-10-22
 */
public interface ScOrderSettleService extends IService<OrderSettle> {

    OrderSettle create(Long orderId, BigDecimal buyPrice, String orderNo, Long userId, PayOrder payOrder,
                       WalletDetailTypeEnum sellType, BigDecimal settleAmount, SettleUserTypeEnum settleUserType,
                       ExpenditureRecordTypeEnum expenditureRecordTypeEnum, BizTypeEnum bizTypeEnum, MarketLevelEnum marketLevelEnum);

    void settleConfirm(OrderSettle orderSettle);


    List<OrderSettle> getUnSettle(PayChannelEnum payChannelEnum);

    IPage<OrderSettleDTO> getSettlePage(PayChannelEnum payChannelEnum, SettleAccountStatusEnum statusEnum,
                                        int pageNo, int pageSize, String startTime);

    void waitSettleOrder(TradingPoolOrder tradingPoolOrder);

    void operationUserFailedSettleOrder(Long userId);
}
